<script setup>
import  {ref} from 'vue'

const userinfo = ref()

const response = [{name:"李1四",phone:12345678990,area:"dongbei",address:"dfvghj",email:"1234qq"},
{name:"李2四",phone:12345678990,area:"dongbei",address:"dfvghj",email:"1234qq"},
{name:"李3四",phone:12345678990,area:"dongbei",address:"dfvghj",email:"1234qq"}
]

userinfo.value = response
</script>


<template>
        <div id="b">
            <div id="ba" >我的收货地址</div>
            <div id="bb" style="margin: 10px 0px 0px 30px; font-size: 20px;">常用地址</div>
            <div id="bc">
            <table cellspacing="0" style="width: 100%; border-collapse: collapse; border:solid 2px black;">
                <thead>
                <tr>
                    <th class="baa">收货人</th>
                    <th class="baa">电话/手机</th>
                    <th class="baa">所在地</th>
                    <th class="baa">详细地址</th>
                    <th class="baa">邮编</th>
                    <th class="baa">操作</th>
                    <th class="baa">移动设置</th>
                </tr>
                </thead>
                <tbody>
                <!-- 这里可以循环添加数据行 -->
                <tr style="font-size: 20px;border:solid 2px black; text-align: center;border-collapse: collapse;  /* 关键属性，消除单元格间距 */">
                    <td>张三</td>
                    <td>13800138000</td>
                    <td>北京市朝阳区</td>
                    <td>建国路88号</td>
                    <td>100000</td>
                    <td>
                    <button>编辑</button>
                    <button>删除</button>
                    </td>
                    <td>
                    <button>上移</button>
                    <button>下移</button>
                    </td>    
                </tr>
               
                    <tr v-for="(user, index) in userinfo" :key="index" style="font-size: 20px;border:solid 2px black; text-align: center;border-collapse: collapse;  /* 关键属性，消除单元格间距 */">
                        <td>{{ user.name }}</td>
                        <td>{{ user.phone }}</td>
                        <td>{{ user.area }}</td>
                        <td>{{ user.address }}</td>
                        <td>{{ user.email }}</td>
                    
                    <td>
                    <button>编辑</button>
                    <button>删除</button>
                    </td>
                    <td>
                    <button>上移</button>
                    <button>下移</button>
                    </td>    
                </tr>
            

                </tbody>
            </table>
            </div>

            <div id="be">
                +新增
            </div>
        </div>
    
</template>

<style>
#header,#footer{
    height: 100px;
    background-color: rgb(255, 174, 0);
  }

  #footer{
    height: 200px;
    /* margin-bottom: 0%; */
    position: absolute;
    bottom: 0;
    width: 100%;
  }

  .headerinfo{
    right: 5%;
    margin-right: 5%;
    height: 100px;
    line-height: 100px;
    font-size: 20px;
  }

  .headerinfo a{
    text-decoration: none;
  } 

  #logininfo {
  
    margin-top:5%;
    /* margin-left: 10%; */
    height: 300px;
  }

  #logo{
    margin-left: 10%;
    height: 100px;
    width: 150px;
  }

  #logo img{
    width: 100%;
    height: 100%;
  }

#an{
    height: 630px;
    width: 1300px;
    /* background-color: red; */
    border: 1px solid rgb(0, 0, 0);
    margin: 0 auto;
    display: flex;
}
#a{
    width: 300px;
    height: 630px;
    /* border: 1px solid rgb(254, 6, 6); */
    
    /* background-color: rgb(85, 85, 166); */
}
#b{
    width: 1000px;
    height: 630px;
    border: 1px solid rgb(15, 15, 15);
    /* background-color: rgb(114, 147, 169); */
 
}
#g{
    height: 40px;
    width: 120px;
    margin:  37px 0px 0px 90px ;
    background-color: rgb(236, 128, 141);
   
    text-align: center;
    font-size: 15px;
    /* 行高 */
    line-height: 40px;
    color: white;
}
#c{
    height: 40px;
    width: 120px;
    margin:  37px 0px 0px 90px ;
    background-color: rgb(207, 24, 45);
    text-align: center;
    font-size: 15px;
    line-height: 40px;
    color: white;
}
.g{
    height: 40px;
    width: 120px;
    margin:  37px 0px 0px 90px ;
 /* background-color: rgb(85, 85, 166); */
    text-align: center;
    font-size: 15px;

    line-height: 40px;
    color: black;
}
#ba{
    width: 1000px;
    height: 30x;
    /* border: 1px solid black; */
    display: flex;
    margin: 20px 0px 0px 0px;
    font-size: 30px;
}
#bc{
    width: 1000px;
    display: flex;
    justify-content:space-around; /* 平均分配剩余空间 */
    margin: 10px 0px 0px 0px ;
}
.baa{
    border: 1px solid black;
    /* height: 100%; */
    text-align: center;
    font-size: 30px;
}
.bd{
    width: 1000px;
    height: 60px;
   
}
.bab{
    border: 1px solid black;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 20px;
}
</style>